package cn.appsys.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.appsys.dao.AppVersionMapper;
import cn.appsys.pojo.AppVersion;
import cn.appsys.service.AppVersionService;

@Service("appVersionService")
public class AppVersionServiceImpl implements AppVersionService {

	@Autowired
	public AppVersionMapper appVersionMapper;

	/**
	 * 根据id查看历史版本
	 */
	public List<AppVersion> getIdVersions(Integer appId) {
		return appVersionMapper.getIdVersions(appId);
	}

	/**
	 * 根据id查看版本信息
	 */
	public AppVersion findIdvVersion(Integer id) {
		return appVersionMapper.findIdvVersion(id);
	}

	/**
	 * 新增App版本信息
	 */
	public int add(AppVersion appVersion) {
		return appVersionMapper.add(appVersion);
	}

	/**
	 * 修改App版本信息
	 */
	public int modify(AppVersion appVersion) {
		return appVersionMapper.modify(appVersion);
	}

	/**
	 * 根据appId查询版本信息Id
	 */
	public AppVersion findAppId(Integer appId) {
		return appVersionMapper.findAppId(appId);
	}

}
